<%@page import="java.sql.Statement"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.sql.*"%>
<%@page import="java.util.ArrayList"%>
<%@page import="YuAn.com.*"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body style="background-color:">
<center>
<h3>管理员<%=session.getAttribute("UserName") %>你好！</h3><br>
<hr>
<form action="deleteservlet" method="get" >
			<div style="text-align: center">请输入需要删除信息的 相关信息(id)</div>
			<div>
				<input type="text" name="message" placeholder="请输入相关信息">
			</div>
			<div>
				<input type="submit" name="submit" value="提交" onclick="return confirm('确定删除这条记录？')">
			</div>
		</form>

	<form action="" method="get">
		<table border="1" width="100%" cellpadding="2" cellspacing="1">
			<tr>
				<td>预案id</td>
				<td>预案名称</td>
				<td>灾害类型</td>
				<td>预案发布时间</td>
				<td>人员身份</td>
				<td>具体措施</td>
<!-- 				<td>操作</td> -->
			</tr>


			<% 
ArrayList list=(ArrayList)session.getAttribute("list");//获取预案信息
if(list==null||list.size()==0){//判断是否为空
	out.print("<tr><td bgcolor='#FFFFFF' colspan='6'>没有任何信息！</td></tr>");
}
else{
	for(int i=0;i<list.size();i++){//遍历数组取出信息
		Plan plan=(Plan)list.get(i);
	    int planID=plan.getPlanID();
	  %>
			<tr>
				<td><%=plan.getPlanID() %></td>
				<td><%=plan.getPlanName() %></td>
				<td><%=plan.getDisasterLabel() %></td>
				<td><%=plan.getTime() %></td>
				<td><%=plan.getIdentity() %></td>
				<td><%=plan.getMeasure() %></td>
<%-- 				<td><a href="delete1.jsp?id=<%=planID %>" onclick="return confirm('确定删除这条记录？')">删除</a></td> --%>
				
			</tr>
			<% 
	}
}


%>
		</table>
	</form>
</center>
</body>
</html>